# -*- coding: utf-8 -*-
# File:login_page.py
# Time: 
# Author : xingtiantian
import allure
import yaml
from selenium import webdriver

from qiyeweixin.base.basepage import BasePage
from qiyeweixin.pages.main_page import MainPage
from qiyeweixin.utils.log import logger


class LoginPage(BasePage):
    """登陆界面"""

    @allure.step("登录")
    def login(self):
        self.open_url("https://work.weixin.qq.com/wework_admin/loginpage_wx")
        self.login_by_cookies()
        logger.info(f"登录到首页")
        return MainPage(self.driver)

    # @allure.step("通过 cookie 登录")
    # def login_by_account(self):
    #     ...
